package com.lh0811.forge.pserv.uacs.api.vo;

import com.google.common.collect.Lists;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * 开发平台-应用资源表
 *
 * @author
 * @email
 * @date 2024-05-24 15:39:41
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class TDesignMenu implements Serializable {

    @Schema(description = "id")
    private Long id;

    @Schema(description = "pid")
    private Long pid;

    @Schema(description = "路径")
    private String path;
    @Schema(description = "资源名称")
    private String name;
    @Schema(description = "布局组件")
    private String component = "LAYOUT";
    @Schema(description = "地址")
    private String redirect;
    @Schema(description = "数据")
    private Meta meta;
    @Schema(description = "子菜单")
    private List<TDesignMenu> children = Lists.newArrayList();

    @Getter
    @Setter
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Meta implements Serializable {
        @Schema(description = "标题")
        private Title title;
        @Schema(description = "图标")
        private String icon;
        @Schema(description = "内嵌地址")
        private String frameSrc;
        @Schema(description = "布局")
        private String layout;
    }

    @Getter
    @Setter
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Title implements Serializable {
        @Schema(description = "中文标题")
        private String zh_CN;
        @Schema(description = "英文标题")
        private String en_US;
    }


}
